﻿using ElectronicShoppingMall.Service.Data;

namespace ElectronicShoppingMall.Service.Services.Interface.Enterprise
{
    interface IGoodsManager
    {
        /// <summary>
        /// 添加商品
        /// </summary>
        /// <param name="newGoods"></param>
        bool CreateGoods(GoodsInfo newGoods);
        /// <summary>
        /// 删除商品
        /// </summary>
        /// <returns></returns>
        bool DeleteByGoodsId(int goodsId);
        /// <summary>
        /// 修改商品信息
        /// </summary>
        /// <param name="goods"></param>
        /// <returns></returns>
        void ModifyGoodsInfo(GoodsInfo goods);
        /// <summary>
        /// 修改库存(根据商品Id和修改的库存量)
        /// </summary>
        /// <returns></returns>
        void ModifyGoodsStock(int goodsId, int stock);
        /// <summary>
        ///根据商品Id 商品上架
        /// </summary>
        /// <param name="goodsId"></param>
        /// <returns></returns>
        bool OnShelvesByGoodsId(int goodsId);
        /// <summary>
        /// 根据商品Id商品下架
        /// </summary>
        /// <param name="goodsId"></param>
        /// <returns></returns>
        bool OffShelvesByGoodsId(int goodsId);
    }
}
